home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Inspector.h
-
- Contains: Interface for a ASLM Test application.
-
- Copyright: © 1991-1993 by Apple Computer, Inc., all rights reserved.
-
- */
-
- #ifndef __INSPECTOR__
- #define __INSPECTOR__
-
- #ifndef __APPLICATION__
- #include <Application.h>
- #endif
-
- #ifndef __LIBRARYMANAGERCLASSES__
- #include <LibraryManagerClasses.h>
- #endif
-
- class TRegisteredObjectsWindow;
- class TRegisteredObjects;
- class TLibraryManager;
-
- class TInspector;
-
- const int kMaxDocuments = 50;
- const int kWindowListStart = 4; /* where the list of windows starts in the windows menu */
-
- enum {kNoCmd, kReloadLibraryManagerCmd, kUnloadLibraryManagerCmd, kGotoSimpleProgramCmd};
-
- const size_t kInspectorPoolSize = 25000;
-
- #define kInspectorLibID "slm:tapp$,1.1"
-
- /**********************************************************************
- ** class TInspector
- ***********************************************************************/
-
- #define kTInspectorID "appl:insp$TInspector,1.1"
-
- class TInspector : public TApplication {
- public:
- TInspector(Ptr qdPtr, Boolean initToolbox = true);
- virtual ~TInspector();
-
- virtual void DoIdle();
- virtual void AdjustMenus();
- virtual void AdjustCursor();
- virtual void DoMenuCommand(short menuID, short menuItem);
- virtual void DoNew(TRegisteredObjects*);
- virtual void Terminate();
-
- // New Methods
-
- TScheduler* GetUpdateListsScheduler();
- short GetLibraryManagerCmd();
-
- static void UnloadLibraryManager();
- static void LoadLibraryManager();
- static int TInspector::Main();
- static void DeathNotifierProc(TInspector* me, EventCode event, OSErr, TLibraryManager* libmgr);
- static void Boot();
- static void Cleanup();
-
- static void SimpleProgram();
- static void SimpleDoEventLoop();
- static void SimpleAdjustMenus();
- static void SimpleDoMenuCommand(short menuID, short menuItem);
-
- private:
- short fLibraryManagerCmd;
- TScheduler* fUpdateListsScheduler;
- TDocument* fWindowsMenuDocList[kMaxDocuments]; // documents in the Windows menu
- Point fNextWindowLocation;
- short fHTopWindowLocation;
- };
-
- /* -----------------------------------------------------------------
- inline methods
- ----------------------------------------------------------------- */
-
- inline TScheduler* TInspector::GetUpdateListsScheduler()
- {
- return fUpdateListsScheduler;
- }
-
- inline short TInspector::GetLibraryManagerCmd()
- {
- return fLibraryManagerCmd;
- }
-
- #endif
-